#pragma once
#include <vector>
#include <iostream>
#include <fstream>
#include <streambuf>
#include <string>
#include <sstream>
#include <algorithm>
#include <iterator>

using namespace std;
class Utility
{
private:
	static Utility* instance;
	
public:
	Utility(void);
	~Utility(void);
	static Utility *getInstance()
	{
		if (!instance)
			instance = new Utility;
		return instance;
	}
	vector<string> split(const string &s, char delim);
	vector<string> &split(const string &s, char delim, vector<string> &elems);
	bool startsWith(const string& haystack, const string& needle);
	bool endsWith(const string& haystack, const string& needle);
	bool contains(const string& haystack, const string& needle);
	string &ltrim(string &s);
	string &rtrim(string &s);
	string &trim(string &s);
	string &removeChars(string &s, char chars[]);
};